﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KouDai.Core.Queue
{
    public class QueueAdapter
    {
        private static AsyncProducerConsumerCollection<int> m_data = new AsyncProducerConsumerCollection<int>();

        private static async Task ConsumerAsync()
        {
            while (true)
            {
                int nextItem = await m_data.Take();
                ProcessNextItem(nextItem);
            }
        }

        private static void ProcessNextItem(int nextItem)
        {
            
        }

        private static void Produce(int data)
        {
            m_data.Add(data);
        }

    }
}